#include "Comm.hpp"

int main()
{
    //获取key
    key_t key = getkeyOrdie();
    cout << "key: " << ToHex(key) << endl;
    sleep(10);
    
    //创建共享内存
    int shmid = CreateShm(key, defaultsize);
    cout << "shmid: " << shmid << endl;
    sleep(10);

    //挂接
    char* addr = (char*)AttachShm(shmid);
    cout << "attach success" << endl;
    sleep(10);

    //删除共享内存
    DeleteShm(shmid);

    return 0;
}